<#include "/admin/common/include/html_head.html"> <#include
"/admin/common/include/sysparam.html"> <#include
"/admin/common/include/pagination.html">
<div class="row-fluid">
	<div class="span12">
		<!-- BEGIN EXAMPLE TABLE PORTLET-->
		<div class="portlet box">

			<div class="portlet-title">
				<div class="caption">
					<h5>内容列表</h5>
				</div>
			</div>
			<div class="portlet-body form">
				<form id="bannerSearchForm">
				<input type="hidden" id="groupKeyId" value="${(_QUERY_n_eq_group_key_id)?if_exists}"/>
				<input type="hidden" id="_QUERY_n_eq_group_key_id" name="_QUERY_n_eq_group_key_id" value="${(_QUERY_n_eq_group_key_id)?if_exists}"/>
				
				    <div class="row-fluid">
						
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>正在编辑分类: <@select2 paramCode=groupKeyCode
							value=(bean.groupKeyId)?if_exists item=' name="groupKeyId"
							require="true" datatype="require" msg="分类编码不能为空" readOnly'/></label>
							</div>
						</div>
					 
					</div> 
					<div class="row-fluid">
						
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>內容主题: <input type="text" aria-controls="sample_1"
									value="${(_QUERY_s_like_name)?if_exists}"
									class="span1 m-wrap medium" name="_QUERY_s_eq_name"
									id="_QUERY_s_like_name"></label>
							</div>
						</div>
						<div class="span6">
							<div class="dataTables_filter" id="sample_1_filter">
								<label>是否有效: <@select paramCode=iseffCode
									value=(_QUERY_n_eq_iseff)?if_exists item='
									name="_QUERY_n_eq_iseff"'/></label>
							</div>
						</div>
					</div>
				 
				</form>

				<div class="alert alert-error " id="errTip" style="display: none;"></div>
				<div class="alert alert-success " id="sucTip" style="display: none;"></div>
				<div class="tab-pane active" id="tab_1">
					<div class="portlet-body">
						<div class="clearfix">
							<button id="banner_query_btn" class="btn blue">
								<i class="icon-search"></i>&nbsp;&nbsp;查询
							</button>
							<button id="banner_add_btn" class="btn blue">
								<i class="icon-plus"></i>&nbsp;&nbsp;新增
							</button>
							<button id="banner_del_btn" class="btn blue">
								<i class="icon-trash"></i>&nbsp;&nbsp;删除
							</button>
								<button id="groupkey_return_btn" class="btn blue" >
							    &nbsp;&nbsp;返回分类列表
							</button>
							
						</div>
						<br>
						<form action="${contextPath}/block/show.op" id="QueryForm">
							<table class="table table-striped table-bordered table-hover"
								id="bannerTable">
								<thead>
									<tr>
										<th style="width: 8px;"><input type="checkbox"
											class="group-checkable" data-set="#bannerTable .checkboxes" /></th>
										<th>內容主题</th>
										<th>归属分类名称</th>
										<th>归属分类编码</th>
										<th>排位</th>
										<th>是否有效</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<#list pageBean.result as nav >
									<tr class="odd gradeX">
										<td><input type="checkbox" class="checkboxes"
											value="${nav.id}" /></td>
										<td>${nav.name}</td> 
										<td>${(nav.groupKeyName)?if_exists}</td>
										<td>${(nav.groupKey)?if_exists}</td>
										<td>${nav.rank}</td>
										<td><@translate paramCode=iseffCode
											value=(nav.iseff)?if_exists /></td>
										<td><a href='#' name="edit_action" value="${nav.id}">编辑</a></td>
									<tr></#list>
								</tbody>
							</table>
						</form>
						<@pagination searchFormId='bannerSearchForm' pBean=pageBean />
					</div>
				</div>

			</div>
		</div>
		<!-- END EXAMPLE TABLE PORTLET-->
	</div>
</div>
</div>

<script>
	jQuery(document).ready(function() {
		tableAction.init({
			tableId : 'bannerTable',
			queryUrl : '${contextPath}/block/show.op',
			deleteUrl : '${contextPath}/block/delete.op',
			editUrl : '${contextPath}/block/showEditForm.op?groupKeyId='+$('#groupKeyId').val(),
			queryBtnId : 'banner_query_btn',
			deleteBtnId : 'banner_del_btn',
			editBtnId : 'banner_add_btn',
			isPopEditForm : false,
			searchFormId : 'bannerSearchForm'
		});
	 
		$("#groupkey_return_btn").bind("click", function() {
			var url =  '${contextPath}/groupkey/show.op';
			mainFrame.addContainer(url);
		});
	});
</script>
<#include "/admin/common/include/html_bottom.html">
